<?php

	 $db_host = 'localhost';
	 $db_user = 'function';
	 $db_pwd = 'w9ak4X1l0Y';

	 $database = 'function_a5110060';

	 $table = 'Availability_Details';

	$con = mysql_connect($db_host, $db_user, $db_pwd);
	if (!$con)
	die("Can't connect to database");
	mysql_select_db($database,$con);

	$functionHallId = $_REQUEST['functionHall'];
	$dates = $_REQUEST['dates'];
	$status = $_REQUEST['status'];
	$slots = $_REQUEST['slots'];
	$currentDate = date("Y-m-d");

	//echo $functionHallId."           ".$dates."            ".$status."           ".$slots."          ".$currentDate;
	if (!empty($functionHallId)) { 
	$sql="INSERT INTO {$table} (function_hall_id,dates,slot,status,created_date,modified_date) VALUES ('".$functionHallId."','".$dates."','".$slots."','".$status."','".$currentDate."','".$currentDate."')";
	//echo("Sql :".$sql);
	$result=mysql_query($sql);
	} 
	//echo("Result :".$result);
	header("Location: ../AddAvailabilityDetails.php");
?> 